<?php
/**
 * @Author: Marte
 * @Date:   2017-08-28 15:08:36
 * @Last Modified by:   Marte
 * @Last Modified time: 2017-08-29 17:06:30
 */
//include('protected/view/home/index/index.html');
if(!empty($_GET['keys'])){
    $keys['key_id']=$_GET['keys'];
    $data=getSelectOne('active',$keys);
    if($data['creat_time']>time()){
        $act_time['act']=1;
        $res=edit('member',$data['id'],$act_time);
        if($res>0){
            del('active',$data['id']);
            echo '<script>alert("激活成功");location.href="index.php?c=index&a=index";</script>';die;
        }else{
            echo '<script>alert("激活失败");history.go(-1);</script>';die;
        }

    }else{
            echo '<script>alert("已过期请重新激活");history.go(-1);</script>';die;
        }
}

else{
    echo '<script>alert("非法操作");location.href="index.php?c=index&a=index";</script>';die;
}